#include "bits/stdc++.h"
using namespace std;
// 计算2的min
typedef unsigned long  long ll;
ll isTwoMin(ll a, ll b)
{
    ll ans = 1;
    while (b)
    {
        if (b % 2 == 1)
        {
            ans *= a;
        }
        a *= a;
        b /= 2;
    }
    return ans;
}
int main()
{
    int n;
    cin >> n;
    cout << isTwoMin(7, n) << "";
}